import request from '@/utils/request'

// 查询博主订单列表
export function listInfluencerOrders(query) {
  return request({
    url: '/InfluencerOrders/InfluencerOrders/list',
    method: 'get',
    params: query
  })
}

// 查询博主订单详细
export function getInfluencerOrders(orderCode) {
  return request({
    url: '/InfluencerOrders/InfluencerOrders/' + orderCode,
    method: 'get'
  })
}

// 新增博主订单
export function addInfluencerOrders(data) {
  return request({
    url: '/InfluencerOrders/InfluencerOrders',
    method: 'post',
    data: data
  })
}

// 修改博主订单
export function updateInfluencerOrders(data) {
  return request({
    url: '/InfluencerOrders/InfluencerOrders',
    method: 'put',
    data: data
  })
}

// 删除博主订单
export function delInfluencerOrders(orderCode) {
  return request({
    url: '/InfluencerOrders/InfluencerOrders/' + orderCode,
    method: 'delete'
  })
}

// 修改订单状态
export function updateOrderStatus(orderCode, status) {
  return request({
    url: `/InfluencerOrders/InfluencerOrders/${orderCode}/status`,
    method: 'put',
    data: { status }
  });
}

//获取博主订单
export function listBloggerOrders(query){
  return request({
    url: '/settled/order/BloggerOrdersList',
    method: 'get',
    params: query
  })
}

//获取博主订单
export function listOrder(query){
  return request({
    url: '/settled/order/list',
    method: 'get',
    params: query
  })
}




